package net.imain.cloud.feign;

import net.imain.config.BasicAuthConfig;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 根据实例名称获取实例信息
 *
 * @author: uncle
 * @apdateTime: 2017-12-14 10:21
 */
// 请求的URL是Eureka，当有这个URL的时候，name这是一个简单的名字，但是如果没有URL的话，name则是service id
@FeignClient(name = "xxx", url = "http://localhost:8761/", configuration = BasicAuthConfig.class)
public interface GeneralFeignClient {
    @RequestMapping("/eureka/apps/{serviceName}")
    String findEurekaByServiceName(@PathVariable("serviceName") String serviceName);
}
